
namespace IFXplus.SmartStorage
{
    public class BaseStorageManager<T> where T : class, new()   // Note: T must be marked as serializable adding [Serializable] attribute or implementing ISerializable
    {
        public static T Get(StorageItemMetadata metadata)
        {
            return (T)StorageService.Get(metadata);
        }

        public static void Insert(StorageItemMetadata metadata, T value)
        {
            StorageService.Insert(metadata, value);
        }

        public static void Remove(StorageItemMetadata metadata)
        {
            StorageService.Remove(metadata);
        }       
    }
}
